package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GroupPurchaseRedemptionMapper;
import com.ruoyi.system.domain.GroupPurchaseRedemption;
import com.ruoyi.system.service.IGroupPurchaseRedemptionService;

/**
 * 团购兑换设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class GroupPurchaseRedemptionServiceImpl implements IGroupPurchaseRedemptionService
{
    @Autowired
    private GroupPurchaseRedemptionMapper groupPurchaseRedemptionMapper;

    /**
     * 通过id查询团购兑换设置
     *
     * @param id 团购兑换设置主键
     * @return 团购兑换设置
     */
    @Override
    public GroupPurchaseRedemption selectGroupPurchaseRedemptionById(Long id)
    {
        return groupPurchaseRedemptionMapper.selectGroupPurchaseRedemptionById(id);
    }

    /**
     * 通过门店名称查询团购兑换设置列表
     *
     * @param storeName 门店名称
     * @return 团购兑换设置
     */
    @Override
    public List<GroupPurchaseRedemption> selectGroupPurchaseRedemptionListByName(String storeName)
    {
        return groupPurchaseRedemptionMapper.selectGroupPurchaseRedemptionListByName(storeName);
    }

    /**
     * 新增团购兑换设置
     *
     * @param groupPurchaseRedemption 团购兑换设置
     * @return 结果
     */
    @Override
    public int insertGroupPurchaseRedemption(GroupPurchaseRedemption groupPurchaseRedemption)
    {
        return groupPurchaseRedemptionMapper.insertGroupPurchaseRedemption(groupPurchaseRedemption);
    }

    /**
     * 修改团购兑换设置
     *
     * @param groupPurchaseRedemption 团购兑换设置
     * @return 结果
     */
    @Override
    public int updateGroupPurchaseRedemption(GroupPurchaseRedemption groupPurchaseRedemption)
    {
        return groupPurchaseRedemptionMapper.updateGroupPurchaseRedemption(groupPurchaseRedemption);
    }

    /**
     * 通过id批量删除团购兑换设置信息
     *
     * @param ids 需要删除的团购兑换设置主键
     * @return 结果
     */
    @Override
    public int deleteGroupPurchaseRedemptionByIds(Long[] ids)
    {
        return groupPurchaseRedemptionMapper.deleteGroupPurchaseRedemptionByIds(ids);
    }

    /**
     * 通过id删除团购兑换设置信息
     *
     * @param id 团购兑换设置主键
     * @return 结果
     */
    @Override
    public int deleteGroupPurchaseRedemptionById(Long id)
    {
        return groupPurchaseRedemptionMapper.deleteGroupPurchaseRedemptionById(id);
    }
}
